<script type="text/javascript">
var successFun=function(res){
if(res.code==200){
	alert('更新成功！');
}
}
$(document).ready(function() { 
	var updateOptions	= {dataType:'json',error:doError,success:doSuccess}
    $('#form').ajaxForm(updateOptions); 
}); 
</script>
<div id="content" class="sitesetting">
<form id="form" action="{url('Site','SaveEdit')}" method="post">
<h3 class="title">淘宝客设置</h3>
<table class="admin-table">
	<tr>
	<td>App Key</td>
	<td>
	<input name="taobao_api_appkey" id="appkey" type="text" value="{$this->data['app']['taobao_api_appkey']}" /><span etype='error_info' class="error_info" id="taobao_api_appkey_info">多个API KEY请用,分隔</span>
	</td>
	</tr>
	<tr>
	<td>App Secret</td>
	<td>
	<input name="taobao_api_appsecret" id="appsecret" type="text" value="{$this->data['app']['taobao_api_appsecret']}" /><span etype='error_info' class="error_info" id="taobao_api_appsecret_info">多个用,分隔，确保和API的个数对应且顺序一致</span>
	</td>
	</tr>
	<tr>
	<td>阿里妈妈PID</td>
	<td>
	<input name="taobao_api_pid" id="pid" type="text" value="{$this->data['app']['taobao_api_pid']}" /><span etype='error_info' class="error_info" id="taobao_api_pid_info">如：mm_14609571_0_0</span>
	</td>
	</tr>
	<tr>
	<td>淘宝网会员帐号</td>
	<td>
	<input name="taobao_api_nick" id="nick" type="text" value="{$this->data['app']['taobao_api_nick']}" /><span etype='error_info' class="error_info" id="taobao_api_nick_info"></span>
	</td>
	</tr>
	<tr>
	<td>API调用方式</td>
	<td>
	<select name="format">
		<option value="json">JSON</option>
		<option value="xml"{if $this->data['app']['format']=='xml'} selected{/if}>XML</option>
	</select>
	<span etype='error_info' class="error_info" id="format_info">推荐使用JSON方式，当列表页大量商品打不开的时候可以尝试切换到XML</span>
	</td>
	</tr>
	<tr><td colspan="2"><input id="btnSave" type="submit" value="保存" /></td></tr>
</table>
</form>
</div>